import React, { Component } from 'react'

class Mailbox extends Component {
  constructor(props) {
    super(props)
    this.state = {
      data: 1
    }
  }

  render() {
    const unreadMessages = this.props.unreadMessages
    return (
      <div>
        <h1>Hello!</h1>
        {unreadMessages.length > 0 && (
          <h2>You hava {unreadMessages.length} unread message.</h2>
        )}
      </div>
    )
  }
}

export default Mailbox
